using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;

using Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common;
using Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common.DataSets;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Configuration;


namespace Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.DataAccess
{
	public class RefData
	{
        [CLSCompliant(false)]
        public static dvRefData GetRefData()
        {
            dvRefData ds = new dvRefData();

            Database db = DatabaseFactory.CreateDatabase(DataAccessHelper.GetDefaultConnectionStringName());

            string SQL = "select * from PnPMessageStatus order by messageStatusID";
            ds.PnPMessageStatus.Load(db.ExecuteReader(CommandType.Text, SQL));

            SQL = "select * from MessageType order by messageTypeID";
            ds.MessageType.Load(db.ExecuteReader(CommandType.Text, SQL));

            SQL = "select * from ServiceProviderType order by serviceProviderTypeID";
            ds.ServiceProviderType.Load(db.ExecuteReader(CommandType.Text, SQL));

            return ds;
        }
	}
}
